package com.ruoyi.house_sale.service.impl;

import java.util.List;
import org.springframework.stereotype.Service;
import com.ruoyi.house_sale.mapper.TicketMapper;
import com.ruoyi.house_sale.domain.Ticket;
import com.ruoyi.house_sale.service.ITicketService;

import javax.annotation.Resource;

/**
 * 票据管理Service业务层处理
 * 
 * @author ruoyi
 * @date 2022-04-08
 */
@Service
public class TicketServiceImpl implements ITicketService 
{
    @Resource
    private TicketMapper ticketMapper;

    /**
     * 查询票据管理
     * 
     * @param ticketid 票据管理主键
     * @return 票据管理
     */
    @Override
    public Ticket selectTicketByTicketid(Long ticketid)
    {
        return ticketMapper.selectTicketByTicketid(ticketid);
    }

    /**
     * 查询票据管理列表
     * 
     * @param ticket 票据管理
     * @return 票据管理
     */
    @Override
    public List<Ticket> selectTicketList(Ticket ticket)
    {
        return ticketMapper.selectTicketList(ticket);
    }

    /**
     * 新增票据管理
     * 
     * @param ticket 票据管理
     * @return 结果
     */
    @Override
    public int insertTicket(Ticket ticket)
    {
        return ticketMapper.insertTicket(ticket);
    }

    /**
     * 修改票据管理
     * 
     * @param ticket 票据管理
     * @return 结果
     */
    @Override
    public int updateTicket(Ticket ticket)
    {
        return ticketMapper.updateTicket(ticket);
    }

    /**
     * 批量删除票据管理
     * 
     * @param ticketids 需要删除的票据管理主键
     * @return 结果
     */
    @Override
    public int deleteTicketByTicketids(Long[] ticketids)
    {
        return ticketMapper.deleteTicketByTicketids(ticketids);
    }

    /**
     * 删除票据管理信息
     * 
     * @param ticketid 票据管理主键
     * @return 结果
     */
    @Override
    public int deleteTicketByTicketid(Long ticketid)
    {
        return ticketMapper.deleteTicketByTicketid(ticketid);
    }

    @Override
    public List<Ticket> findAllTicket() {
        return ticketMapper.findAllTicket();
    }

    @Override
    public Long findNextNo(Long ticketid) {
        return ticketMapper.findNextNo(ticketid);
    }

    @Override
    public int updNextNo(Long ticketid, Long nextno) {
        return ticketMapper.updNextNo(ticketid,nextno);
    }


}
